<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/**
 * @package name
 * @author Jason Fong <QQ:740168902>
 * Date:2012-12-28 16:34:07
 * @copyright (c) 2012-12-28, Jason Fong
 * @package name
 */

// ------------------------------------------------------------------------
class Reg_model extends CI_Model{
    public function __construct() {
        parent::__construct();
        
        //初始化,手动连接数据库
        $this->load->database();
    }
    
    public function do_select(){
        //设置查询条件
        $this->db->select('name');
        //选择数据表
        $query = $this->db->get('areas');
        //result方法将查询结果返回
        return $query->result();
    }
}




